package io.bluefw.blueui;

import java.util.EnumSet;

import javax.servlet.DispatcherType;

import io.dropwizard.Bundle;
import io.dropwizard.setup.Bootstrap;
import io.dropwizard.setup.Environment;

public class BlueUIBundle implements Bundle {

	@Override
	public void initialize(Bootstrap<?> bootstrap) {
	}

	@Override
	public void run(Environment environment) {
		 environment.servlets().addMimeMapping("btl", "application/btl");
		 environment.servlets().addFilter("BlueUIFilter", new BlueUIFilter())
		 		               .addMappingForUrlPatterns(EnumSet.allOf(DispatcherType.class), false, "*.btl");
	}
}

